import subprocess

# 🔹 设置转换脚本路径（来自 llama.cpp）
convert_script = ".//llama.cpp//convert_hf_to_gguf.py"

# 🔹 你的合并后模型路径
model_path = "./qwen1.5-7b-chat-xiaoyu-merged"

# 🔹 目标 GGUF 文件路径
output_path = "./qwen1.5-7b-chat-xiaoyu.gguf"

# 🔹 调用转换命令
command = [
    "python", convert_script, 
    model_path,"--outtype", "f16"
]

# 🔹 执行转换
subprocess.run(command)

print(f"✅ GGUF 转换完成: {output_path}")
